package ua.org.nuos.sdms.middle.util.validator;

import javax.persistence.EntityManager;

/**
 * Created with IntelliJ IDEA.
 * User: dio
 * Date: 9/1/12
 * Time: 8:29 PM
 * To change this template use File | Settings | File Templates.
 */
public abstract class AbstractValidator<T> {

    protected EntityManager em;

    public AbstractValidator(EntityManager em) {
        this.em = em;
    }

    public abstract void validate(T entity) throws IllegalArgumentException;
    public abstract void validatePersisted(T entity) throws IllegalArgumentException;
}
